package cn.geminis.crypto.csp.soft.ec;

import cn.geminis.crypto.core.key.PrivateKey;
import cn.geminis.crypto.core.key.PublicKey;
import cn.geminis.crypto.csp.soft.AbstractSoftAsymmetricBlockCipher;
import cn.geminis.crypto.csp.soft.empty.EmptyAsymmetricBlockCipher;
import cn.geminis.crypto.csp.soft.empty.EmptyBlockCipher;
import org.bouncycastle.crypto.AsymmetricBlockCipher;
import org.bouncycastle.crypto.ec.ECElGamalEncryptor;
import org.bouncycastle.crypto.engines.ElGamalEngine;

/**
 * @author Allen
 */
public class EcBlockCipher extends AbstractSoftAsymmetricBlockCipher {

    private PublicKey publicKey;

    public EcBlockCipher(PublicKey publicKey, PrivateKey privateKey) {
        super(publicKey, privateKey);
        this.publicKey = publicKey;
    }

    @Override
    protected AsymmetricBlockCipher createBlockChiper() {
        return new EmptyAsymmetricBlockCipher(this.publicKey);
    }
}
